﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<nelech.Models.DBModel.Marquee>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	רשימת הודעות
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>רשימת הודעות</h2>

    <table>
        <tr>
            <th></th>
            <th>
                מס
            </th>
            <th>
                כותרת
            </th>
            <th>
                טקסט
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("עריכה", "EditMarquee", new { id = item.id })%> |
                <%= Html.ActionLink("מחיקה", "DeleteMarquee", new { id = item.id })%>
            </td>
            <td>
                <%= Html.Encode(item.id) %>
            </td>
            <td>
                <%= Html.Encode(item.title) %>
            </td>
            <td>
                <%= item.text %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("צור חדש", "CreateMarquee") %>
    </p>

</asp:Content>



